home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 6
/
Amiga Format AFCD06 (Nov 1996, Issue 90).iso
/
serious
/
commercial
/
cloanto
/
ppaint
/
rexx
/
animbrushtoanim.pprx
< prev
next >
Wrap
Text File
|
1996-06-17
|
2KB
|
119 lines
/* PPaint Amiga Rexx script - Copyright © 1995 Cloanto Italia srl */
/*
$VER: AnimBrushToAnim.pprx 1.0
This script converts an Anim-Brush into an animation.
For more information, or suggestions, please address E-mail to
<info@cloanto.com>
*/
MYPORT = 'PPAINT'
IF ~SHOW('P', MYPORT) THEN DO
IF EXISTS('PPaint:PPaint') THEN DO
ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
DO 30 WHILE ~SHOW('P',MYPORT)
ADDRESS COMMAND 'Wait >NIL: 1 SEC'
END
END
ELSE DO
SAY "Personal Paint could not be loaded."
EXIT 10
END
END
IF ~SHOW('P', MYPORT) THEN DO
SAY 'Personal Paint Rexx port could not be opened.'
EXIT 10
END
ADDRESS VALUE MYPORT
OPTIONS RESULTS
OPTIONS FAILAT 10000
Version 'REXX'
IF RESULT < 4 THEN DO
errmess = 'This script requires a newer_version of Personal Paint.'
SAY errmess
RequestNotify 'PROMPT="'errmess'"'
EXIT 10
END
FreeEnv QUERY
IF RC ~= 0 THEN EXIT RC
LockGUI
loaded = 0
GetBrushAttr FRAMES
frnum = RESULT
IF frnum = 0 THEN DO
LoadAnimBrush
IF RC = 0 THEN DO
GetBrushAttr FRAMES
frnum = RESULT
loaded = 1
END
END
IF frnum > 0 THEN DO
GetBrushAttr WIDTH
bw = RESULT
GetBrushAttr HEIGHT
bh = RESULT
GetBrushAttr COLORS
bcol = RESULT
GetBrushAttr DISPLAY
bdisp = RESULT
GetBrushAttr HANDLEX
bhx = RESULT
GetBrushAttr HANDLEY
bhy = RESULT
GetBrushAttr FRLENGTH
bfl = RESULT
GetBrushAttr FRPOS
bfp = RESULT
DelFrames ALL FORCE
ClearImage FORCE
Set '"IMAGEW='bw'" "IMAGEH='bh'" "COLORS='bcol'" "DISPLAY='bdisp'" "SCREENW='bw'" "SCREENH='bh'" "ASCROLL=0"'
IF RC = 0 THEN DO
AddFrames frnum
IF RC = 0 THEN DO
SetFramePos 1
SetBrushAttr HANDLEX 0 HANDLEY 0 FRLENGTH frnum FRPOS 1
PaintMode REPLACE
DO frm = 1 TO frnum
PutBrush 0 0
UseBrushPalette
SetFramePos NEXT
END
SaveAnim
END
ELSE DO
errmess = 'Environment frames_cannot be created'
SAY errmess
RequestNotify 'PROMPT="'errmess'"'
END
END
ELSE DO
errmess = 'Environment format_cannot be set'
SAY errmess
RequestNotify 'PROMPT="'errmess'"'
END
SetBrushAttr HANDLEX bhx HANDLEY bhy FRLENGTH bfl FRPOS bfp
DelFrames ALL FORCE
ClearImage FORCE
END
IF loaded THEN
FreeBrush FORCE
UnlockGUI